/**
 * @desc   数组分组
 * @param  {Array} arr
 * @param  {Number} szie 分成几组
 * @return {Array} 
 */
export function chunk(arr,size){
    if(arr.length === 0){
        return []
    }
    let result = []
    let tmp = []
    arr.forEach(item => {
        if(tmp.length === 0){
            result.push(tmp)
        }
        tmp.push(item)
        if(tmp.length === size){
            tmp = []
        }
    });
    return result
}